Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The great configuration overhaul of 2020 #130

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

devth
Copy link
Member

@devth devth commented Apr 16, 2020

Todo

  • Config defaults Mechanism to describe defaults in config yetibot#1017
  • Support overriding any config using channel settings or user-specific settings
  • Write the corresponding "Channel as context" guide
  • Generate config from specs (instead of maintaining the 3 formats of sample configs at https://github.com/yetibot/yetibot.core/tree/master/config). Maybe a ClojureScript project that creates a React config component and publishes it to bit.dev
  • Add config getter to cmd-hook. This couples together a schema, a command and its namespace, and a subset of configuration. If the config is not present/valid, when a user tries to execute the command, the command would then report an error that it is not configured and a link to the exact subset of configuration it requires. This also allows yetibot core to pass the requested config submap to command handler functions, which means core can optionally override it based on channel settings (
  • Audit all the specs and try to narrow them down, e.g. yetibot.url should be a url that does not end with a / (alternatively, parse it with the uri lib and get the part we want).

Issues

Tools

@codecov
Copy link

codecov bot commented Apr 16, 2020

Codecov Report

Merging #130 into master will decrease coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #130      +/-   ##
==========================================
- Coverage   42.45%   42.26%   -0.20%     
==========================================
  Files          94       91       -3     
  Lines        4070     3890     -180     
  Branches      184      171      -13     
==========================================
- Hits         1728     1644      -84     
+ Misses       2158     2075      -83     
+ Partials      184      171      -13     
Impacted Files Coverage Δ
src/yetibot/core/config.clj 84.61% <ø> (ø)
src/yetibot/core/commands/decode.clj 40.00% <0.00%> (-50.00%) ⬇️
src/yetibot/core/commands/uptime.clj 36.36% <0.00%> (-27.28%) ⬇️
src/yetibot/core/models/default_command.clj 45.45% <0.00%> (-4.55%) ⬇️
src/yetibot/core/adapters/adapter.clj 62.50% <0.00%> (-4.17%) ⬇️
src/yetibot/core/util/format.clj 76.05% <0.00%> (-3.68%) ⬇️
src/yetibot/core/webapp/resolvers.clj 26.58% <0.00%> (-3.66%) ⬇️
src/yetibot/core/adapters.clj 32.50% <0.00%> (-3.06%) ⬇️
src/yetibot/core/commands/category.clj 27.27% <0.00%> (-1.62%) ⬇️
src/yetibot/core/repl.clj 53.06% <0.00%> (-1.29%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99daeae...a11ed69. Read the comment docs.

@devth devth changed the title Support overriding config via channel settings Overhaul configuration Apr 16, 2020
@devth devth changed the title Overhaul configuration The great configuration overhaul migration of 2020 Apr 16, 2020
@devth devth changed the title The great configuration overhaul migration of 2020 The great configuration overhaul of 2020 Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant